package com.spring.controller;

import com.spring.mapper1.BookMapper1;
import com.spring.mapper2.BookMapper2;
import com.spring.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BookController {
    @Autowired
    BookMapper1 bookMapper1;
    @Autowired
    BookMapper2 bookMapper2;
    @GetMapping("/book")
    public void book(){
        List<Book> books1=bookMapper1.getAllBooks();
        List<Book> books2=bookMapper2.getAllBooks();
        System.out.println("books1:"+books1);
        System.out.println("books2:"+books2);
    }
}
